package com.generalbackend.role.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.generalbackend.common.model.entity.User;
import com.generalbackend.common.model.vo.UserVO;
import com.generalbackend.role.model.query.UserQuery;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
* ClassName: User
* @Description 用户表Mapper
* @author tim.xie
* @date 2021-12-16 13:18
*/

@Mapper
@Repository
public interface UserMapper extends BaseMapper<User>{

    /**
    * 根据条件查询列表
    * @return
    */
    List<User> list(Page<User> page, @Param("queryOption") UserQuery userQuery);

    /**
     * 通过用户id获取用户
     * @param id
     * @return
     */
    UserVO getUserVoById(@Param("id") Long id);
}
